package com.sumainfor.pc.market.controller.rentadviser;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.PageUtils;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.market.service.RdPactService;
import com.sumainfor.pc.market.service.RdPactSharedService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @Date 2018年11月7日
 * @Describe 查询历史合同记录
 */
@RestController
    @RequestMapping("/rentadviser/RdPactShared")
public class RdPactSharedController implements Serializable {
    Logger log = LoggerFactory.getLogger(RdPactSharedController.class);// 日志
    @Autowired
    private RdPactSharedService rdPactSharedService;
    /**
     * 查询用户的历史签约
     */
    @GetMapping("/getHoPactSharedList")
    public JsonResult getHoPactSharedList(@RequestParam Map<String,Object>params){
        JsonResult result=new JsonResult();
        if (params.get("PaId")==null){
            log.info("缺少合同编号");
            return result.putFailed("参数不正确");
        }
        List<Map<String,Object>> list=rdPactSharedService.getHoPactSharedList(params);
        if (list!=null){
            result.put(list);
        }else{
            result.putFailed("服务器繁忙");
        }
        return result;
    }
}
